﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script>
        var i = 0;
        function rot() {
            i = ++i % 4;
            if (!document.all.aDiv.style.filter)
                document.all.aDiv.style.filter = 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + i + ')';
            else
                document.all.aDiv.filters.item('DXImageTransform.Microsoft.BasicImage').Rotation = i;
        } 
    
    </script>
</head>
<body>
    <input type="button" value="Rotate   by   90   deg" onclick="rot();" />
    <div id="aDiv" style="width: 903px; height: 617px; background-color: lime;">
        <img src="img.jpg">
    </div>
</body>
</html>
